function extractMethods(fileContent) {
    const methodRegex = /((public|protected|private|internal)\s+\w+\s+\w+\s*\([^)]*\)\s*\{(?:[^{}]|(?:\{(?:[^{}]|(?:\{[^{}]*\}))*\}))*\})/gs;
    const methods = [];
    let match;

    while ((match = methodRegex.exec(fileContent)) !== null) {
        const fullText = match[1];
        const nameMatch = fullText.match(/(\w+)\s*\(/);
        const name = nameMatch ? nameMatch[1] : '';
        const bodyStartIndex = fullText.indexOf('{') + 1;
        const bodyEndIndex = fullText.lastIndexOf('}');
        const body = fullText.substring(bodyStartIndex, bodyEndIndex).trim();

        methods.push({
            fullText,
            name,
            body
        });
    }
    return methods;
}

module.exports = {extractMethods}